package org.lt.cj.model;

import org.lt.cj.model.dao.ICollectDao;
import org.lt.cj.model.impl.CollectImpl;

/**
 *
 * @author zgh
 */
public class DataTransfer {

    private static final ICollectDao cd = new CollectImpl();
    private long categoryId;
    private long sellerId;
    private long productId;

    //对分类表进行操作
    public void tranCategory(long cid, String name, long firstCate, long secondCate, String lanFrom, String toLan, int updated) {


        cd.insertCategory(cid, name, firstCate, secondCate, lanFrom, toLan, updated);
    }

    //插入商家信息
    public void tranSeller(long sid, String name, String company, String location, String site, String imNumber, String fromLan, String toLan, int updated) {
    
        cd.insertSeller(sid, name, company, location, site, imNumber, fromLan, toLan, updated);
    }

    //插入商品信息
    public void tranProduct(long pid, long cateId, long sellerId, String name, double price, int sellCount, String collectTime, String url, String fromLan, String toLan, int updated) {
    cd.insertProduct(pid, cateId, sellerId, name, price, sellCount, collectTime, url, fromLan, toLan, updated);
    }

    //插入属性信息
    public void tranAttribute(long aid, long productId, String name, String value, String fromLan, String toLan, int updated) {

    cd.insertAttribute(aid, productId, name, value, fromLan, toLan, updated);
    }

    //插入评价信息
    public void tranEvaluation(long eid, long productId, String content, String time, String fromLan, String toLan, int updated) {
    cd.insertEvaluation(eid, productId, content, time, fromLan, toLan, updated);
    }

    //插入详情信息
    public void tranDescription(long did, long productId, String content, String fromLan, String toLan, int updated) {
    cd.insertDescription(did, productId, content, fromLan, toLan, updated);
    }

    //总调用转换入库方法
    public void insertGo() {
    }
}
